import React, { useEffect } from "react";
import { Outlet, useNavigate } from "react-router-dom";
import { Button } from "antd";

const HomePage = (props: any) => {
  const navigate = useNavigate();

  const submit = async () => {
    navigate({
      pathname: "/login",
      search: "?search=param",
    });
  };
  useEffect(() => {}, []);

  return (
    <div className="home-container">
      <h1>Home</h1>

      <Button onClick={submit}>go login</Button>
      <h1>home</h1>
      <h1>这里不该闪</h1>
      <Outlet />
    </div>
  );
};
export default HomePage;
